<script setup>
import { ref } from 'vue'
const bannerList = ref([
  {
    id: 1,
    url: 'https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/34bf4e726f493dc212757b6c3436cf7d.png?w=2452&h=920'
  },
  {
    id: 2,
    url: 'https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/397f2569b126d8fba446b6bbf57ef771.jpg?thumb=1&w=1226&h=460&f=webp&q=90'
  },
  {
    id: 3,
    url: 'https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/01a422c2d04a7668e6d1d4748aeadf61.jpg?thumb=1&w=1226&h=460&f=webp&q=90'
  },
  {
    id: 4,
    url: 'https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/69d476acc0af86cce9521b97ea29214f.jpg?thumb=1&w=1226&h=460&f=webp&q=90'
  },
  {
    id: 5,
    url: 'https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/d52382893e8bce0ec0c4139a9b448950.jpg?thumb=1&w=1226&h=460&f=webp&q=90'
  }
])
</script>

<template>
  <div class="home-banner">
    <el-carousel height="550px">
      <el-carousel-item v-for="item in bannerList" :key="item.id">
        <img :src="item.url" alt="" />
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<style scoped lang="scss">
.home-banner {
  width: 1240px;
  height: 560px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 98;
  overflow: hidden;
  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    &:hover {
      cursor: pointer;
    }
  }
}
</style>
